﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Newtonsoft.Json.Linq;

namespace PhoneClassLibraryJSON {
    public class Connection: IConnect{

        public static IConnect JSon2Connect(JObject job){
              return new Connection((bool)job["connect"],(string)job["token"]);   
        }

        private Connection( bool connect, string tocken ) {
            Connecte = connect;
            Tocken = tocken;
        }

        public bool Connecte {
            get;
            private set;
        }

        public string Tocken {
            get;
            private set;
        }
    }
}
